"""
告警相关模型
"""
from pydantic import BaseModel
from typing import Optional, Literal

class Alarm(BaseModel):
    """告警信息"""
    id: int
    time: str
    level: Literal["critical", "warning", "info"]
    source: str
    message: str
    status: Literal["pending", "resolved", "ignored", "active"]
    type: Optional[str] = None